/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.prerecitran.entity;

import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.modules.base.entity.cars.Tcar;
import com.jeesite.modules.base.entity.fixedexpense.FixedExpense;
import com.jeesite.modules.base.entity.supplier.Supplier;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 预收转账单Entity
 * @author wsm
 * @version 2021-03-24
 */
@Table(name="t_advances_received_transfer_detail", alias="a", columns={
		@Column(name="advances_received_transfer_detail_id", attrName="advancesReceivedTransferDetailId", label="预收转账单明细ID", isPK=true),
		@Column(name="car_id", attrName="carId", label="车辆"),
		@Column(name="row_number", attrName="rowNumber", label="行号"),
		@Column(name="origin_row_number", attrName="originRowNumber", label="原行号"),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="original_expense_type", attrName="originalExpenseType", label="原费用类型"),
		@Column(name="advances_received_balance", attrName="advancesReceivedBalance", label="预收款余额"),
		@Column(name="expense_type", attrName="expenseType", label="费用类型"),
		@Column(name="carry_over_frame_number", attrName="carryOverFrameNumber", label="结转至车架号"),
		@Column(name="carry_over_amount", attrName="carryOverAmount", label="结转金额"),
		@Column(name="advances_received_transfer_id", attrName="advancesReceivedTransferId.advancesReceivedTransferId", label="预收转账单ID"),
	}, joinTable= {
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= FixedExpense.class, attrName="originalExpenseType1", alias="b",
				on="b.fixed_expense_id = a.original_expense_type", columns={
				@Column(name="fixed_expense_id", label="原费用类型", isPK=true),
				@Column(name="fixed_expense_name", label="原费用类型名称", isQuery=false),
		}),
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= FixedExpense.class, attrName="ExpenseType1", alias="c",
				on="c.fixed_expense_id = a.expense_type", columns={
				@Column(name="fixed_expense_id", label="原费用类型", isPK=true),
				@Column(name="fixed_expense_name", label="原费用类型名称", isQuery=false),
		}),
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Tcar.class, attrName="tcar", alias="d",
				on="d.car_id = a.car_id", columns={
				@Column(name="car_id", label="车辆id", isPK=true),
				@Column(name="car_name", label="车辆名称"),
		})
}, orderBy="a.advances_received_transfer_detail_id ASC"
)
public class TadvancesReceivedTransferDetail extends DataEntity<TadvancesReceivedTransferDetail> {
	
	private static final long serialVersionUID = 1L;
	private String advancesReceivedTransferDetailId;		// 预收转账单明细ID
	private String carId;		// 车辆
	private String frameNumber;		// 车架号
	private String originalExpenseType;		// 原费用类型
	private String originalExpenseTypes;		// 原费用类型(临时字段)
	private FixedExpense originalExpenseType1;
	private FixedExpense ExpenseType1;
	private Double advancesReceivedBalance;		// 预收款余额
	private String expenseType;		// 费用类型
	private String carryOverFrameNumber;		// 结转至车架号
	private Double carryOverAmount;		// 结转金额
	private TadvancesReceivedTransfer advancesReceivedTransferId;		// 预收转账单ID 父类
	private Long rowNumber;
	private Long originRowNumber;
	private Tcar tcar;
	private String carName;

	public String getOriginalExpenseTypes() {
		return originalExpenseTypes;
	}

	public void setOriginalExpenseTypes(String originalExpenseTypes) {
		this.originalExpenseTypes = originalExpenseTypes;
	}

	public TadvancesReceivedTransferDetail() {
		this(null);
	}

	public String getCarName() {
		return carName;
	}

	public void setCarName(String carName) {
		this.carName = carName;
	}

	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}

	public Long getOriginRowNumber() {
		return originRowNumber;
	}

	public void setOriginRowNumber(Long originRowNumber) {
		this.originRowNumber = originRowNumber;
	}

	public TadvancesReceivedTransferDetail(TadvancesReceivedTransfer advancesReceivedTransferId){
		this.advancesReceivedTransferId = advancesReceivedTransferId;
	}

	public Tcar getTcar() {
		return tcar;
	}

	public void setTcar(Tcar tcar) {
		this.tcar = tcar;
	}

	public FixedExpense getOriginalExpenseType1() {
		return originalExpenseType1;
	}

	public void setOriginalExpenseType1(FixedExpense originalExpenseType1) {
		this.originalExpenseType1 = originalExpenseType1;
	}

	public FixedExpense getExpenseType1() {
		return ExpenseType1;
	}

	public void setExpenseType1(FixedExpense expenseType1) {
		ExpenseType1 = expenseType1;
	}

	public String getAdvancesReceivedTransferDetailId() {
		return advancesReceivedTransferDetailId;
	}

	public void setAdvancesReceivedTransferDetailId(String advancesReceivedTransferDetailId) {
		this.advancesReceivedTransferDetailId = advancesReceivedTransferDetailId;
	}
	
	@Length(min=0, max=64, message="车辆长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}
	
	@Length(min=0, max=2, message="原费用类型长度不能超过 2 个字符")
	public String getOriginalExpenseType() {
		return originalExpenseType;
	}

	public void setOriginalExpenseType(String originalExpenseType) {
		this.originalExpenseType = originalExpenseType;
	}
	
	public Double getAdvancesReceivedBalance() {
		return advancesReceivedBalance;
	}

	public void setAdvancesReceivedBalance(Double advancesReceivedBalance) {
		this.advancesReceivedBalance = advancesReceivedBalance;
	}
	
	@Length(min=0, max=2, message="费用类型长度不能超过 2 个字符")
	public String getExpenseType() {
		return expenseType;
	}

	public void setExpenseType(String expenseType) {
		this.expenseType = expenseType;
	}
	
	@Length(min=0, max=100, message="结转至车架号长度不能超过 100 个字符")
	public String getCarryOverFrameNumber() {
		return carryOverFrameNumber;
	}

	public void setCarryOverFrameNumber(String carryOverFrameNumber) {
		this.carryOverFrameNumber = carryOverFrameNumber;
	}
	
	public Double getCarryOverAmount() {
		return carryOverAmount;
	}

	public void setCarryOverAmount(Double carryOverAmount) {
		this.carryOverAmount = carryOverAmount;
	}
	
	@Length(min=0, max=64, message="预收转账单ID长度不能超过 64 个字符")
	public TadvancesReceivedTransfer getAdvancesReceivedTransferId() {
		return advancesReceivedTransferId;
	}

	public void setAdvancesReceivedTransferId(TadvancesReceivedTransfer advancesReceivedTransferId) {
		this.advancesReceivedTransferId = advancesReceivedTransferId;
	}
	
}